package com.vtc.test;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

import com.vtc.R;

public class TabHostActivity extends FragmentActivity  {
	 
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.tabhost_activity);
        
        TabHost tabHost =(TabHost) findViewById(R.id.TabHost1);
        
        
        TabSpec photospec = tabHost.newTabSpec("HinhAnh");
        photospec.setIndicator("Hình ảnh");
        Intent photosIntent = new Intent(this, HinhAnhActivity.class);
        photospec.setContent(photosIntent);        
        tabHost.addTab(photospec);
        
        TabSpec songspec = tabHost.newTabSpec("NgheNhac");
        songspec.setIndicator("Nghe nhạc");
        Intent songsIntent = new Intent(this, BaiHatActivity.class);
        songspec.setContent(songsIntent);
        tabHost.addTab(songspec);
       
        tabHost.setup();
    }
}
